how to solve logarithms problems